package com.scau.clothes.sale.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scau.clothes.core.core.entity.BaseEntity;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.ArrayList;
import java.util.List;

@Data
@TableName("sale")
public class Sale extends BaseEntity implements Serializable {
    /**
     * 订单id
     */
    @TableId(value = "sale_id", type = IdType.AUTO)
    private Long saleId;

    /**
     * 订单编号
     */
    private String saleNo;

    /**
     * 总价
     */
    private BigDecimal total;

    /**
     * 销售时间
     */
    private Date saleTime;

    /**
     * 订单状态
     */
    private String status;

    /**
     * 订单明细类
     *
     */
    @TableField(exist = false)
    private List<SaleClothes> saleClothes = new ArrayList<>();

    /**
     * 支付类
     */
    @TableField(exist = false)
    private Payment payment;

    /**
     * 支付id
     */
    private Long paymentId;

    /**
     * 删除标志
     */
    private Long isDelete;
}
